

categories=("sanat", "youtube", "heroes", "web23", "faideliprogramlar", "fotograf", "politika", "web", "belgelendirme", "bilgisayar", "dizi", "oyun", "ubuntu", "video", "acikkaynak", "bilim", "cografya", "debian", "microsoft", "teknoloji", "cizgiroman", "gundem", "eklenti", "guncel", "turkiye", "geek", "edebiyat", "masaustu", "yazilim", "ivirzivir", "okul", "tarih", "mozilla", "filmdizi", "google", "guvenlik", "geyik", "seminer", "guzelsite", "sinematiyatro", "firefox", "muzik", "programlama", "gunluksel", "aktuel", "kultur", "bilisim", "pardus", "internet", "yasam", "genel", "gezegen", "linux")


f=open("models.py", "w")

f.write("from django.db import models\n")

for entry in categories:
	Entry = entry+"girdi"
	
	s="\n"+"class"+" "+Entry+"(models.Model):"+"\n"+\
"	"+"yazar=models.CharField(maxlength=50)"+"\n"+\
"	"+"baslik=models.CharField(maxlength=200)"+"\n"+\
"	"+"link=models.URLField(unique=True)"+"\n"+\
"	"+"tarih=models.DateTimeField()"+"\n"+\
"	"+"icerik=models.CharField(maxlength=40000)"+"\n"

	f.write(s)

for entry in categories:
	Entry = entry+"frekans"
	
	s="\n"+"class"+" "+Entry+"(models.Model):"+"\n"+\
"	"+"kelime=models.CharField(maxlength=30)"+"\n"+\
"	"+"frekans=models.IntegerField()"+"\n"

	f.write(s)
	
s = "\n"+"class yazar(models.Model):"+"\n"+\
"	"+"yazaradi = models.CharField(maxlength=100, unique=True)"+"\n"+\
"	"+"yazarlinki = models.URLField()"+"\n"

f.write(s)

s="\n"+"class digergirdi"+" "+"(models.Model):"+"\n"+\
"	"+"yazar=models.CharField(maxlength=50)"+"\n"+\
"	"+"baslik=models.CharField(maxlength=200)"+"\n"+\
"	"+"link=models.URLField(unique=True)"+"\n"+\
"	"+"tarih=models.DateTimeField(maxlength=100)"+"\n"+\
"	"+"icerik=models.CharField(maxlength=40000)"+"\n"

f.write(s)

s="\n"+"class tempgirdi"+" "+"(models.Model):"+"\n"+\
"	"+"yazar=models.CharField(maxlength=50)"+"\n"+\
"	"+"baslik=models.CharField(maxlength=200)"+"\n"+\
"	"+"link=models.URLField()"+"\n"+\
"	"+"tarih=models.DateTimeField(maxlength=100)"+"\n"+\
"	"+"icerik=models.CharField(maxlength=40000)"+"\n"+\
"	"+"category=models.CharField(maxlength=30)"+"\n"+\
"	"+"categorylink=models.URLField()"+"\n"+\
"	"+"yazarlinki=models.URLField()"+"\n"

f.write(s)

f.close()
	 
